package com.situ.mall.web.controller;

import com.situ.mall.common.service.IProductService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/search")
public class SearchController {


    @Autowired
    private IProductService productService;

    @PostMapping("/goods")
    public String page(Model model,String keyword){

        model.addAttribute("searchlist",productService.searchList(keyword));

        return "search";
    }


}
